package io.geekidea.boot.system.query;

import io.geekidea.boot.framework.query.DataRangeQuery;
import io.geekidea.boot.system.vo.SysMenuTreeVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.List;

/**
 * 系统菜单查询参数
 *
 * @author geekidea
 * @since 2022-12-26
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "系统菜单查询参数")
public class SysMenuQuery extends DataRangeQuery {

    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "是否有权限的资源Id")
    private List<Long> hasPermResIds;
    @Schema(description = "菜单类型，1：目录，2：菜单，3：权限")
    private List<Integer> types;
    @Schema(description = "状态，0：禁用，1：启用")
    private Boolean status;
    @Schema(description = "是否显示,0：不显示，1：显示")
    private Boolean isShow;
    @Schema(description = "关键字搜索")
    private String keyword;
    @Schema(description = "角色Id")
    private Long roleId;
    @Schema(description = "菜单Id")
    private Long parentId;
    @Schema(description = "菜单Code")
    private String code;
    @Schema(description = "表单Id")
    private Long fId;
    @Schema(description = "资源Id")
    private List<Long> resourceIds;
    private ResourceTreeBuildCallback resourceTreeBuildCallback;

    public interface ResourceTreeBuildCallback {
        boolean callback(SysMenuTreeVo sysMenuTreeVo);
    }


}

